<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="static/css/themes/suishoupai.css" />
  <link rel="stylesheet" href="static/css/themes/suishoupai.min.css" /> 
 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile.structure-1.4.5.min.css" /> 
  <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> 
  <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> 
<meta charset="utf-8">
<title>图片广场</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<style>
    .b{
        margin: 0;
	/*width: 100%;
	height: 100%;*/
        min-width: 100%;
    min-height: 100%;
background: #000000 ;  
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none; /* 阻止浏览器选择文字 */
    }
    
    .pic{
        position:absolute;
       left: 0;
      right: 0;
      top: 0;
       bottom: 0;
      position: absolute;
      margin: auto;
     max-width:100%;
    }
    .good{
        position:absolute;
         bottom:0;
        left:4%;
       z-index:2;
        
    }
    .li{
          width:10%;
    }
    .l{
        display:inline;
        position:absolute;
       top:10px;
    }
    .c{
        position:absolute;
        bottom:15px;
        right:10%;
        z-index:2;
    }
    .likes{
        position:absolute;
        width:20px;
        left:5px;
    }
    .foot{
        position:absolute;
        border:2px;
        height:8%;
        width:100%;
        bottom:0;
        
    }
  
</style>
</head>
<body>
  <div data-role="page" id="pageone" data-theme="b">
<?php
  $link = mysql_connect(SAE_MYSQL_HOST_M . ':' . SAE_MYSQL_PORT, SAE_MYSQL_USER, SAE_MYSQL_PASS);

		// 连从库
		// $link=mysql_connect(SAE_MYSQL_HOST_S.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);

		if ($link) {
			mysql_select_db(SAE_MYSQL_DB, $link);
			mysql_query("set names utf8");
			//your code goes here
			
			$time1=date('Y-m-d H:i:s',strtotime('-1 day'));
			 $time=date('Y-m-d H:i:s'); 
            $an=mysql_query("SELECT * FROM suishoupai where TIME between '$time1' and '$time' ORDER BY likes desc LIMIT 1");
			$ann = mysql_fetch_array($an);
		    echo "<img class=\"pic\" id=\"p\"  src=\"".$ann['pic']."\"/>";
            echo"<div class=\"c\">©".$ann['name']."</div>";
            echo"<div class=\"t\">".$ann['text']."</div>";
            echo "<div class=\"good\"><img class=\"li\" src=\"http://whdxxshxcb-test.stor.sinaapp.com/like.png\"/><div class=\"l\">".$ann['likes']."</div></div>";
		}
			mysql_close($link);
?>
    
    
   <div data-role="header">
  <div data-role="navbar">
    <ul>
      <li><a href="publish_likes.php">最赞</a></li>
      <li><a href="publish_random.php">随机</a></li>
      <li><a href="publish_time.php">最新</a></li>
    </ul>
  </div>
</div>

         <div data-role="footer" class="foot">
</div>
</body>
    </html>